package com.vcredit.creditcat.service;

import com.vcredit.creditcat.framework.pagination.Criteria;
import com.vcredit.creditcat.framework.pagination.Page;
import com.vcredit.creditcat.model.ProcessSpecial;
import com.vcredit.creditcat.persistence.base.ProcessSpecialMapper;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/*
 * @author zhangxingong
 * @version 1.0
 * @since 1.0
*/
@Service
public class ProcessSpecialService {

  @Autowired
  private ProcessSpecialMapper processSpecialMapper;

  public Page<ProcessSpecial> findByPage(Criteria criteria) {
    return new Page<ProcessSpecial>(processSpecialMapper.findByPageCount(criteria),
        processSpecialMapper.findByPage(criteria));
  }

  public List<ProcessSpecial> find(ProcessSpecial processSpecial) {
    return processSpecialMapper.find(processSpecial);
  }

  public ProcessSpecial findById(Long specialId) {
    return processSpecialMapper.findById(specialId);
  }

  public List<ProcessSpecial> findAll() {
    return processSpecialMapper.findAll();
  }

}
